<template>
    <div v-if="coverType == 1" :class="[$style.box, color ? $style.full : '']" :style="{background : color || 'transparent'}">
        <component :is="Remixicons[icon]"></component>
    </div>
    <NetImg v-else style="width: 30px;" :class="$style.icon" :src="icon" />
</template>

<script lang="ts" setup>
    import * as Remixicons from "@remixicon/vue";
    import NetImg from "./NetImg.vue";
    const props = defineProps<{
        icon : string;
        color:string;
        coverType:number;
    }>()
</script>

<style lang="scss" module>
    .box{
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;

        &.full{
            color: #fff;
            font-size: 14px;
        }
    }

    .icon{
        width: 30px;
        height: 30px;
        border-radius: 40%;
    }
</style>